<%-- 
    Document   : authentification
    Created on : 21 nov. 2013, 09:10:09
    Author     : JBP
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="java.sql.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
    </head>
    <body>
                <%--  <jsp:useBean id="sess" class="rie07.Person" scope="session"/>
                <jsp:setProperty name="sess" property="nom" param="UInom"/>
                <jsp:setProperty name="sess" property="prenom" param="UIprenom"/>
                <jsp:setProperty name="sess" property="email" param="UIemail"/>

                <%
                    sess.setNom(request.getParameter("UInom"));
                    sess.setPrenom(request.getParameter("UIprenom"));
                    sess.setEmail(request.getParameter("UIemail"));
                    %>
                    --%>
                <jsp:useBean id="sess" class="rie07.User" scope="session"/>
                <jsp:useBean id="bdd" class="rie07.Bdd" scope="session"/>
                <jsp:setProperty name="sess" property="nom" param="UInom"/>
                <jsp:setProperty name="sess" property="mdp" param="UImdp"/>
                <jsp:setProperty name="sess" property="email" param="UIemail"/>
                
                <%
                    //sess.addUser(request.getParameter("UInom"), request.getParameter("UImdp"));
                    sess.setNom(request.getParameter("UInom"));
                   // sess.setMdp(request.getParameter("UImdp"));
                    //sess.setEmail(request.getParameter("UIemail"));
                    //System.out.println("mon nom etc : "+sess.getNom()+" lol "+sess.getMdp());
                    //sess.addUser(sess.getNom(), sess.getMdp());
                    %>
                
                <p>
                    Bonjour : <jsp:getProperty name="sess" property="nom" />
                    <br>
                    
                    Base de données :
                    
                    <%
                    out.println(bdd.getMethode());
                  
                    /*ArrayList<String> addr = new ArrayList<String>();
                    addr = sess.getIP();

                    for(int i=0; i<addr.size();i++){
                        out.println("Adresse IP n°"+i+" : "+addr.get(i));
                    }*/
                        
              %>

                </p>

              <p>
                  <input type="submit" value="Soumettre" name="Submit" />
              </p>
        </form>

        </form>
    </body>
</html>
